package cn.com.yiqi.wsc.dao.city;

import cn.com.artemis.framework.base.commons.persistence.CrudDao;
import cn.com.yiqi.wsc.dao.city.criteria.CityCriteria;
import cn.com.yiqi.wsc.entity.city.City;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 何刚
 * @ClassName: ${class}
 * @Description: TODO
 * @date 2017/3/6
 */
@Repository
public interface CityDao extends CrudDao<City> {


    /**
     * 根据cityCode获取所属的城市
     *
     * @param criteria
     * @return
     */
    List<City> getCodeAndCityNameByCityCode(CityCriteria criteria);

    /**
     * 根据code获取名称
     *
     * @param code
     * @return
     */
    String getNameByCode(@Param("code") String code);
}
